package soccer.view;

import javax.swing.JSplitPane;
import javax.swing.JPanel;
import java.awt.GridLayout;
import java.awt.FlowLayout;
import java.awt.Component;
import java.awt.event.ActionListener;
import javax.swing.JButton;

public class UserOptionsPanel extends JSplitPane{
	private JButton playerOptionButton;
	private JButton matchOptionButton;
	private JButton teamsOptionButton;
	private JButton coachOptionButton;
	private JButton statisticOptionButton;
	private JPanel navigationPanel;
	public UserOptionsPanel() {
		setContinuousLayout(true);
		setEnabled(false);
		
		JPanel contentPanel = new JPanel();
		setRightComponent(contentPanel);
		contentPanel.setLayout(null);
		
		JPanel panel_2 = new JPanel();
		panel_2.setBounds(60, 46, 266, 200);
		contentPanel.add(panel_2);
		
		
		navigationPanel = new JPanel();
		setLeftComponent(navigationPanel);
		navigationPanel.setLayout(null);
		
		statisticOptionButton = new JButton("Statistics");
		statisticOptionButton.setBounds(10, 48, 89, 23);
		navigationPanel.add(statisticOptionButton);
		
		playerOptionButton = new JButton("Players");
		playerOptionButton.setBounds(10, 82, 89, 23);
		navigationPanel.add(playerOptionButton);
		
		matchOptionButton = new JButton("Matches");
		matchOptionButton.setBounds(10, 116, 89, 23);
		navigationPanel.add(matchOptionButton);
		
		teamsOptionButton = new JButton("Teams");
		teamsOptionButton.setBounds(10, 150, 89, 23);
		navigationPanel.add(teamsOptionButton);
		
		coachOptionButton = new JButton("Coach");
		coachOptionButton.setBounds(10, 184, 89, 23);
		navigationPanel.add(coachOptionButton);
	
		setOneTouchExpandable(false);
		setDividerLocation(120);
	}

	
	public void setLeftPanel(JPanel p){
		setLeftComponent(p);
		setDividerLocation(120);
		setDividerLocation(120);
	}
	public void setRigthPanel(JPanel p){
		setRightComponent(p);
		setDividerLocation(120);
	}
	public void addPlayerOptionsButtonActionListener(ActionListener l){
		playerOptionButton.addActionListener(l);
	}
	public void addTeamOptionButtonActionListener(ActionListener l){
		teamsOptionButton.addActionListener(l);
	}
	public void addCoachOptionButtonActionListener(ActionListener l){
		coachOptionButton.addActionListener(l);
	}
	public void addMatchOptionButtonActionListener(ActionListener l){
		matchOptionButton.addActionListener(l);
	}
	public void addStatisticOptionButtonactionListener(ActionListener l){
		statisticOptionButton.addActionListener(l);
	}
	public JButton getPlayerOptionButton() {
		return playerOptionButton;
	}
	public void setPlayerOptionButton(JButton playerOptionButton) {
		this.playerOptionButton = playerOptionButton;
	}
	public JButton getMatchOptionButton() {
		return matchOptionButton;
	}
	public void setMatchOptionButton(JButton matchOptionButton) {
		this.matchOptionButton = matchOptionButton;
	}
	public JButton getTeamsOptionButton() {
		return teamsOptionButton;
	}
	public void setTeamsOptionButton(JButton teamsOptionButton) {
		this.teamsOptionButton = teamsOptionButton;
	}
	public JButton getCoachOptionButton() {
		return coachOptionButton;
	}
	public void setCoachOptionButton(JButton coachOptionButton) {
		this.coachOptionButton = coachOptionButton;
	}
	public JButton getStatisticOptionButton() {
		return statisticOptionButton;
	}
	public void setStatisticOptionButton(JButton statisticOptionButton) {
		this.statisticOptionButton = statisticOptionButton;
	}

	public JPanel getNavigationPanel() {
		return navigationPanel;
	}

	public void setNavigationPanel(JPanel navigationPanel) {
		this.navigationPanel = navigationPanel;
	}
	
}
